package bebDialogs;

import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;

import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;

public class ExerciceDialog extends JDialog{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	Container contentPan;
	JPanel center=new JPanel();
	JPanel south=new JPanel();
	JButton cancel=new JButton("cancel");
	JButton ok=new JButton("ok");
	
	//TODO
	public ExerciceDialog(int row) {
		contentPan=this.getContentPane();
		contentPan.setLayout(new BorderLayout());
		contentPan.add(center,BorderLayout.CENTER);
		contentPan.add(south,BorderLayout.SOUTH);
		
		center.setLayout(new GridBagLayout());
		GridBagConstraints c=new GridBagConstraints();
		c.gridy=0;
		
		for(int i=0;i<row;i++){
			center.add(new ExercicePanel(i+1),c);
			c.gridy++;
		}
		
		south.add(cancel);
		south.add(ok);
		setSize(new Dimension(900, row*75));
		this.setVisible(true);
	}
	
}


